package co.edu.udea.xyz.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Validaciones {

	public static boolean isEmail(String correo){
		Pattern pat=null;
		Matcher mat=null;
		
		pat = Pattern.compile("[a-zA-Z0-9]+[.[a-zA-Z0-9_-]+]*@[a-z0-9][\\w\\.-]*[a-z0-9]\\.[a-z][a-z\\.]*[a-z]$");
		
		if("".equals(correo))
			return false;
		
		mat = pat.matcher(correo);
		if(mat.find()){
			return true;
		}else{		
			return false;
		}
	}
	
	
}
